/*******************************************************************************
 * Package: com.hngtrust.iir.third.controller
 * Type:    ChinaTrustRegistrationController
 * Date:    2021/10/14 10:26
 *
 * Copyright (c) 2021 HUANENG GUICHENG TRUST CORP.,LTD All Rights Reserved.
 *
 * You may not use this file except in compliance with the License.
 *******************************************************************************/
package com.hngtrust.iir.fileclean.controller;

import com.hngtrust.framework.bind.ResponseInfo;
import com.hngtrust.iir.fileclean.service.FileCleanService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.security.PermitAll;

/**
 * 调用中信登第三方接口（受益所有人）
 *
 * @author Yujiaqi
 * @date 2021/10/14 10:26
 */

@Slf4j
@RestController
@RequestMapping("/file_clean")
@Api(tags = "公告研报文件多余miniio文件清除")
public class FileCleanController {
    
    @Autowired
    private FileCleanService fileCleanService;
    
    @ApiOperation(value = "公告文件多余miniio文件清除", notes = "公告文件多余miniio文件清除")
    @PostMapping("/notice_file")
    @PermitAll
    public ResponseInfo noticeFileCleanMiniio() throws Exception {
        log.info("FileCleanController.noticeFileCleanMiniio start...");
        fileCleanService.queryNoticeFileCleanMiniio();
        return new ResponseInfo();
    }
    
    @ApiOperation(value = "研报文件多余miniio文件清除", notes = "研报文件多余miniio文件清除")
    @PostMapping("/report_file")
    @PermitAll
    public ResponseInfo reportFileCleanMiniio() throws Exception {
        log.info("FileCleanController.noticeFileCleanMiniio start...");
        fileCleanService.queryReportFileCleanMiniio();
        return new ResponseInfo();
    }
    
}
